.class public Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;
.super Landroid/os/AsyncTask;
.source "PromotionUpdateTask.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/String;",
        "Ljava/lang/String;",
        "Ljava/lang/String;",
        ">;"
    }
.end annotation


# instance fields
.field private TAG:Ljava/lang/String;

.field private activity:Lcom/bitauto/autoeasy/selectcar/PromotionActivity;

.field private list:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/news/Object/Promotion;",
            ">;"
        }
    .end annotation
.end field

.field private url:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 27
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 17
    const-string v0, "NewsUpdateTask"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->TAG:Ljava/lang/String;

    .line 28
    return-void
.end method

.method public constructor <init>(Lcom/bitauto/autoeasy/selectcar/PromotionActivity;Ljava/lang/String;)V
    .locals 1
    .parameter "activity"
    .parameter "url"

    .prologue
    .line 21
    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 17
    const-string v0, "NewsUpdateTask"

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->TAG:Ljava/lang/String;

    .line 22
    iput-object p2, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->url:Ljava/lang/String;

    .line 23
    iput-object p1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->activity:Lcom/bitauto/autoeasy/selectcar/PromotionActivity;

    .line 24
    return-void
.end method


# virtual methods
.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->doInBackground([Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected varargs doInBackground([Ljava/lang/String;)Ljava/lang/String;
    .locals 3
    .parameter "params"

    .prologue
    .line 38
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "URL : "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->url:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 39
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->activity:Lcom/bitauto/autoeasy/selectcar/PromotionActivity;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->url:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/bitauto/autoeasy/selectcar/PromotionActivity;->getList(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v0

    iput-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->list:Ljava/util/ArrayList;

    .line 40
    const/4 v0, 0x0

    return-object v0
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->onPostExecute(Ljava/lang/String;)V

    return-void
.end method

.method protected onPostExecute(Ljava/lang/String;)V
    .locals 2
    .parameter "result"

    .prologue
    .line 45
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->activity:Lcom/bitauto/autoeasy/selectcar/PromotionActivity;

    iget-object v1, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->list:Ljava/util/ArrayList;

    invoke-virtual {v0, v1}, Lcom/bitauto/autoeasy/selectcar/PromotionActivity;->updateList(Ljava/util/ArrayList;)V

    .line 46
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->activity:Lcom/bitauto/autoeasy/selectcar/PromotionActivity;

    iget-object v0, v0, Lcom/bitauto/autoeasy/selectcar/PromotionActivity;->progressBar:Landroid/widget/ProgressBar;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 48
    return-void
.end method

.method protected onPreExecute()V
    .locals 2

    .prologue
    .line 33
    iget-object v0, p0, Lcom/bitauto/autoeasy/selectcar/PromotionUpdateTask;->activity:Lcom/bitauto/autoeasy/selectcar/PromotionActivity;

    iget-object v0, v0, Lcom/bitauto/autoeasy/selectcar/PromotionActivity;->progressBar:Landroid/widget/ProgressBar;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 34
    return-void
.end method
